from selenium.webdriver.common.by import By
import unittest,time
from selenium import webdriver
from Po.Lx_827.Base import Base
class Page(Base):
    fram_loc=(By.XPATH,'//iframe[starts-with(@id,"x-URS-iframe")]')
    def fram1(self):
        self.fram(self.fram_loc)
    name_loc=(By.NAME,'email')
    def name(self):
        self.send_keys(self.name_loc,'L13012558376')
    password_loc=(By.NAME,'password')
    def password(self):
        self.send_keys(self.password_loc,'liushuai370283LS')
    denglu_loc=(By.ID,'dologin')
    def denglu(self):
        self.click(self.denglu_loc)
    xiexin_loc=(By.XPATH,'//*[@id="_mail_component_98_98"]/span[2]')
    def xiexin(self):
        self.click(self.xiexin_loc)
    shoujian_loc=(By.CLASS_NAME,'nui-editableAddr-ipt')
    def shouxin(self):
        self.send_keys(self.shoujian_loc,'3455784099@qq.com')
    zhuti_loc=(By.XPATH,'//input[contains(@id,"subjectInput")]')
    def zhuti(self):
        self.send_keys(self.zhuti_loc,'赵阔阔')
    fram2_loc=(By.CLASS_NAME,'APP-editor-iframe')
    def fram2(self):
        self.fram(self.fram2_loc)
    neirong_loc=(By.CLASS_NAME,'nui-scroll')
    def neirong(self):
        self.send_keys(self.neirong_loc,'建筑材料A老板')
    fasong_loc=(By.CLASS_NAME,'nui-btn-text')
    def dasong(self):
        self.click(self.fasong_loc)
    def test_126_login(self):
        self.get('https://126.com/')
        self.fram1()
        self.name()
        self.password()
        self.denglu()
        time.sleep(5)
        self.tuifram()
        self.xiexin()
        self.shouxin()
        self.zhuti()
        self.fram2()
        self.neirong()
        self.tuifram()
        time.sleep(2)
        self.dasong()
        time.sleep(3)



